package com.ustc.hewei.rpc.server.register;

import com.ustc.hewei.rpc.server.ServiceObject;

import java.net.UnknownHostException;

/**
* @description: 服务注册的统一接口
* @author hewei
* @date 2022/7/26 19:11
* @version 1.0
*/

public interface ServiceRegister {
    /*
     * @description: 通过ServiceObject对象注册服务
     * @param service 传入的服务
     * @author: hewei
     * @date: 2022/7/26 19:13
     **/
    void register(ServiceObject service) throws UnknownHostException;

    /*
     * @description: 在服务端的默认的注册器map中找到对应的ServiceObject
     * @param name 接口的全类名
     * @return com.ustc.hewei.rpc.server.ServiceObject
     * @author: hewei
     * @date: 2022/7/26 19:14
     **/
    ServiceObject getServiceObject(String name);
}
